package com.woniuxy.util;


import cn.hutool.core.date.DateUtil;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;

public class DateUtils {

    public static String parseString(LocalDateTime time, String pattern){
        return DateUtil.format(time, pattern);
    }

    public static Long parseLong(String time,String pattern) throws ParseException {
        SimpleDateFormat format = new SimpleDateFormat(pattern);
        return format.parse(time).getTime();
    }
}
